
#ifndef XDNS_ADDRESS_QUERY_H
#define XDNS_ADDRESS_QUERY_H

#include "xdns-query.h"
#include <netinet/in.h>
#include <string>

class XdnsAddressQuery : public XdnsQuery
{
public:
    XdnsAddressQuery(const struct in_addr* ipAddress,
                     XdnsListener* listener);
    virtual ~XdnsAddressQuery();

    const struct in_addr* GetAddress() const;

    /* See xdns-query.h for description. */
    virtual XdnsError ComposeQueryData(unsigned short requestId,
                                       XdnsData& data
                                       ) const;
    virtual void GetQuestion(XdnsQuestionInfo& question) const;

private:
    std::string GenerateQuestionName() const;

    struct in_addr m_ipAddress;
};

#endif  // XDNS_ADDRESS_QUERY_H

